﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using ScrumTable.Common;
using ScrumTable.DL.Data.Schema.ScrumTableV1;

#endregion

namespace ScrumTable.BL.DM.DataManagement
{
    /// <summary>
    /// Contains additional informations about the driver and the loaded
    /// schema.
    /// </summary>
    public class DomainDriverInformation
    {
        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        /// <summary>
        /// Gets the ScrumTable schema name.
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Gets the ScrumTable schema version.
        /// </summary>
        public string Version { get; private set; }

        /// <summary>
        /// Gets the ScrumTable driver name.
        /// </summary>
        public string Driver { get; private set; }

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Do not create instances of this class.
        /// </summary>
        /// <remarks>
        /// New versions of ScrumTable may derive from this class and build a
        /// ScrumTableV2Schema for example. The name of the root schema class
        /// must be "ScrumTable.DL.Data.Schema.[Version].[Version]Schema",
        /// "ScrumTable.DL.Data.Schema.ScrumTableV2.ScrumTableV2Schema" for
        /// example.
        /// The first argument must be of type "Serialization.SchemataRoot".
        /// </remarks>
        internal DomainDriverInformation(ScrumTableV1Schema schemata)
        {
            PreCondition.AssertNotNull(schemata, "schemata");

            Name = schemata.Name;
            Version = schemata.Version;
            Driver = schemata.Driver;
        }

        #endregion
    }
}